package com.bmw.blog.controller;

import com.bmw.blog.model.Blog;
//import com.bmw.blog.model.Bmw_vi;
import com.bmw.blog.model.BmwMedia;
import com.bmw.blog.service.BlogService;
import com.bmw.blog.service.BmwMediaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * Created by Administrator on 2018/11/26.
 */
@Controller
@RequestMapping("blog")
public class BlogController {

    @Autowired
    BmwMediaService blogService;

    @GetMapping("index")
    public String index(){
        return "blog/index.html";
    }

    @GetMapping("login")
    public String login(){
        return "blog/login-x2.html";
    }

    @GetMapping("calendar")
    public String calendar(){
        return "blog/calendar.html";
    }

    @GetMapping("bmwImage")
    public String bmwImage(){
//        System.out.print("进入方法、、、、、、、、、、、、、、、");
//        List<Blog> blog = blogService.blogList(1);
//        for(int i=0;i<blog.size();i++){
//            System.out.println(blog.get(i).getBmwName());
//        }
        return "blog/bmw_image.html";
    }

    @GetMapping("bmwVideo")
    public String bmwVideo(){
        return "blog/bmw_video.html";
    }

    @GetMapping("bmwGif")
    public String bmwGif(){
        return "blog/bmw_gif.html";
    }

    @GetMapping("bmwCartoon")
    public String bmwCartoon(){
        return "blog/bmw_cartoon.html";
    }

    @GetMapping("alert")
    public String alert(){
        return "blog/alerts.html";
    }

    @GetMapping("images-icons")
    public String images(){
        return "blog/images-icons.html";
    }

//    @GetMapping("findVi")
//    @ResponseBody
//    public List<BmwMedia> findVi(){
//        BmwMedia media = new BmwMedia();
//        List<BmwMedia> bmw_vi = blogService.findList(media);
//        return bmw_vi;
//    }

}
